<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>付款申请单</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div>
        <form id="capPayInfo_form">
            <div class="fieldset1 tabel_col clearFix">
                <div class="caption">
                    <span class="title">基本信息</span>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付款代收</div>
                    <div class="field">
                        <input type="checkbox" name="isFstCol" id="isFstCol"
                               <c:if test="${capPayInfoVO.isFstCol==1}">checked</c:if>>
                        <span class="requiredSymbol">是</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付金额(元)</div>
                    <div class="field">
                        <span id="initPayAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付不含咨询费(元)</div>
                    <div class="field">
                        <span id="initFstShowAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">设备款(元)</div>
                    <div class="field">
                        <span id="pAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">所属事业部</div>
                    <div class="field">
                        <span>${capPayInfoVO.buOrgCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">项目类型</div>
                    <div class="field">
                        <span>${capPayInfoVO.prjTypCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">客户名称</div>
                    <div class="field">
                        <a style="cursor: pointer;" onclick="showCstDtl(${capPayInfoVO.cstId})" class="link">
                            <span>${capPayInfoVO.cstNm}</span>
                        </a>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">融资租赁合同号</div>
                    <div class="field">
                        <a href="javascript:toPrjDetail(${capPayInfoVO.prjId})" class="link">
                            <span>${capPayInfoVO.contNo}</span>
                        </a>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">支付表号</div>
                    <div class="field">
                        <a href="javascript:showPrjPrdPaySchDtl()" class="link">
                            <span>${capPayInfoVO.paySchNo}</span>
                        </a>
                        <input type="text" style="display: none;" id="paySchId" name="paySchId"
                               value="${capPayInfoVO.paySchId}">
                        <input type="text" style="display: none;" id="cstMgrOrgCd" name="cstMgrOrgCd"
                               value="${capPayInfoVO.cstMgrOrgCd}">
                        <input type="text" style="display: none;" id="buOrgCd" name="buOrgCd"
                               value="${capPayInfoVO.buOrgCd}">
                        <input type="text" style="display: none;" id="prjPrdId" name="prjPrdId"
                               value="${capPayInfoVO.prjPrdId}">
                        <input type="text" style="display: none;" id="prjId" name="prjId" value="${capPayInfoVO.prjId}">
                        <input name="payTypCd" id="payTypCd" value="${payTypCd}" type="text" style="display:none;">
                        <input name="payStsCd" id="payStsCd" value="${capPayInfoVO.payStsCd}" type="text"
                               style="display:none;">
                        <input name="prjPrdDtlId" id="prjPrdDtlId" value="${capPayInfoVO.prjPrdDtlId}" type="text"
                               style="display:none;">
                        <input name="payAmt" id="payAmt" value="${capPayInfoVO.payAmt}" type="text"
                               style="display:none;">
                    </div>
                </div>
                <c:if test="${spFlag==1 || checkSp==1 }">
	                <div class="fieldBox col_33">
	                    <div class="label"><span class="requiredSymbol">上牌信息</span></div>
	                    <div class="field">
	                    	<c:if test="${spState==1 }">
	                        	<span class="requiredSymbol">已上牌</span>
	                    	</c:if>
	                    	<c:if test="${spState==0 }">
	                        	<span class="requiredSymbol">未上牌</span>
	                    	</c:if>
	                    	<c:if test="${spState==0 && spFlag==1 && isExistSp==1 }">
			                    <a href="javascript:modifySp(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>修改上牌信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${spState==0 && spFlag==1 && isExistSp==0 }">
			                    <a href="javascript:addSp(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>添加上牌信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${spFlag==0 && isExistSp==1 }">
			                    <a href="javascript:showSp(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>查看上牌信息</span>
		                        </a>
	                    	</c:if>
	                    </div>
	                </div>
                </c:if>
                <c:if test="${dyFlag==1 || checkDy==1 }">
	                <div class="fieldBox col_33">
	                    <div class="label"><span class="requiredSymbol">抵押信息</span></div>
	                    <div class="field">
	                    	<c:if test="${dyState==1 }">
	                        	<span class="requiredSymbol">已抵押</span>
	                    	</c:if>
                            <c:if test="${dyState==2 }">
                                <span class="requiredSymbol">无法抵押</span>
                            </c:if>
	                    	<c:if test="${dyState==0 }">
	                        	<span class="requiredSymbol">未抵押</span>
	                    	</c:if>
	                    	<c:if test="${dyState==0 && dyFlag==1 && isExistDy==1 }">
			                    <a href="javascript:modifyDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>修改抵押信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${dyState==0 && dyFlag==1 && isExistDy==0 }">
			                    <a href="javascript:addDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>添加抵押信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${dyFlag==0 && isExistDy==1 }">
			                    <a href="javascript:showDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span>查看抵押信息</span>
		                        </a>
	                    	</c:if>
	                    </div>
	                </div>
                </c:if>
                <!-- jiangzg add 2017-11-13 15:27:38 工行卡贷维护是否工行放款-->
                <c:if test="${isAddPayerStatusCd == '0' and capPayInfoVO.prjTypCd == 'GHKD'}">
                    <div class="fieldBox col_33">
                        <div class="label">工行是否放款</div>
                        <div class="field">
                            <input name="payerStatusCd" id="payerStatusCd"
                                   data-value="${payerStatusCd}" validate="{required:true}"
                                   placeholder="请选择" ltype="combobox" ligerui="{readonly:true}">
                            <span class="requiredSymbol">*</span>
                        </div>
                    </div>
                </c:if>
                <c:if test="${isAddPayerStatusCd == '1'}">
                    <div class="fieldBox col_33">
                        <div class="label">工行是否放款</div>
                        <div class="field">
                            <input name="payerStatusCd" id="payerStatusCd"
                                   data-value="${payerStatusCd}" validate="{required:true}"
                                   placeholder="请选择" ltype="combobox" onchange="payerStsCdChange();">
                            <span class="requiredSymbol">*</span>
                        </div>
                    </div>
                </c:if>
                    <div id= "ghDt" class="fieldBox col_33" style="display: none">
                        <div class="label">工行放款时间</div>
                        <div class="field">
                            <input name="thdPayDt" id="thdPayDt" type="text" class="ui-datepicker"
                                   value="${thdPayDt}" validate="{required:false}">
                            <span class="requiredSymbol">*</span>
                        </div>
                    </div>
                    <div id="ghAmt" class="fieldBox col_33" style="display: none">
                        <div class="label">工行放款金额(元)</div>
                        <div class="field">
                            <input  name="thdPayAmt" id="thdPayAmt" type="text" class="ui-textbox"
                                   data-tofix="2" data-value="${thdPayAmt}"
                                   validate="{required:false,number:true}">
                            <span class="requiredSymbol">*</span>
                        </div>
                    </div>
                    <c:if test="${showCreditResult=='1' && capPayInfoVO.prjTypCd=='GHKD' }">
	                    <c:if test="${sendStatus=='success' }">
							<div class="fieldBox col_33">
								<div class="label">征信查询结果</div>
								<div class="field">
								    <span>
										<c:if test="${auditResult=='pending' }">待处理</c:if>
										<c:if test="${auditResult=='pass' }">通过</c:if>
										<c:if test="${auditResult=='reject' }">拒绝/驳回</c:if>
										<c:if test="${auditResult=='quit' }">放弃/退出</c:if>
										<c:if test="${auditResult=='unknown' }">其他/未知</c:if>
									</span>
								</div>
							</div>
						</c:if>
		                <c:if test="${sendStatus!='success' }">
		                	<div class="fieldBox col_33">
								<div class="label">提交征信结果</div>
								<div class="field">
									<span>${sendStatusNm }</span>
									<a href="javascript:submitCredit()" class="link">
				                    	<span>提交征信</span>
									</a>
								</div>
							</div>
		                </c:if>
                    </c:if>
                <!--新能源事业部  ——直租 呈报人设置交车日-->
                <c:if test="${buOrgCd == '00000013' && (taskDefKey == 'FLOW_00000013_002_001_012' || taskDefKey == 'FLOW_00000013_007_001_012')}">
	                <c:if test="${bizTypCd == '1' && isNeedAddTime == '1'}">
	                    <div class="fieldBox col_66_auto">
	                        <div class="label">设置起租日</div>
	                        <div class="field">
	                            <input id="lsDt" type="text" class="ui-datepicker" name = "lsDt" value="${lsDt}" validate="{required:false}" >
	                        </div>
	                    </div>
	                </c:if>
	                 <c:if test="${bizTypCd == '1' && isNeedAddTime == '0'}">
	                    <div class="fieldBox col_66_auto">
	                        <div class="label">设置起租日</div>
	                        <div class="field">
	                            <input id="lsDt" type="text" class="ui-datepicker" name = "lsDt" value="${lsDt}" validate="{required:false}" >
	                        </div>
	                    </div>
	                </c:if>
                </c:if> 
                <c:if test="${isNeedAddTime == '0'}">
                    <div class="fieldBox col_66_auto">
                        <div class="label">实际交车时间</div>
                        <div class="field">
                            <input id="dueDt" type="text" class="ui-datepicker" name = "dueDt" value="${dueDt}" validate="{required:false}" ligerui="{readonly:true}">
                        </div>
                    </div>
                </c:if>
                <c:if test="${isNeedAddTime == '1'}">
                    <div class="fieldBox col_66_auto">
                        <div class="label">实际交车时间</div>
                        <div class="field">
                            <input id="dueDt" type="text" name = "dueDt" class="ui-datepicker" value="${dueDt}" validate="{required:true}">
                        </div>
                    </div>
                </c:if>
                <c:if test="${capPayInfoVO.buOrgCd == '00000013'}">
	                <div class="fieldBox col_100">
			            <div class="label">是否团单</div>
			            <div class="field">
			            	<select name="isGrp" id="isGrp" data-value=" ">
			                	<option value=" " selected="selected">请选择</option>
			                	<c:forEach items="${yesOrNOList }" var="kv">
									<option value="${kv.key }">${kv.value }</option>
								</c:forEach>
							</select>
			            </div>
			        </div>
	                <c:if test="${saveIsGrp==1}">
				    	<div class="fieldset1 clearFix">
					        <div class="btnsBox" style="text-align: center;">
						        	<span id="saveIsGrp_Btn" class="sq-button sq-button-round" onclick="saveIsGrp_Btn();">保存</span>
						    </div>
					    </div>
			    	</c:if>
                    <c:if test="${gpsFlag == 1}">
                        <div class="fieldBox col_33">
                            <div class="label">是否需要安装有线GPS</div>
                            <div class="field">
                                <span class="requiredSymbol" style="color: red">需装</span>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${gpsFlag == 2}">
                        <div class="fieldBox col_33">
                            <div class="label">是否需要安装有线GPS</div>
                            <div class="field">
                                <span class="requiredSymbol" style="color: green">免装</span>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${capPayInfoVO.buOrgCd == '00000013' && (capPayInfoVO.prjTypCd=='CPYW' || capPayInfoVO.prjTypCd=='ZCSS')}">
                        <div class="fieldBox col_33">
                            <div class="label">挂靠公司名下未抵押车辆信息</div>
                            <div class="field">
                                <span class="requiredSymbol">${noPassAudCarNum}</span>
                            </div>
                        </div>
                        <div class="fieldBox col_33">
                            <div class="label">供应商名下未抵押车辆信息</div>
                            <div class="field">
                                <span class="requiredSymbol">${noSplPassNum}</span>
                            </div>
                        </div>
                    </c:if>
                    <div class="fieldBox col_100">
                        <div class="label">客户风险标记</div>
                        <div class="field">
						<span name="rskCstSignDesc" id="rskCstSignDesc"  style="color: red">
                                ${rskCstSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">担保人风险标记</div>
                        <div class="field">
						<span name="rskGuarSignDesc" id="rskGuarSignDesc"  style="color: red">
                                ${rskGuarSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">设备风险标记</div>
                        <div class="field">
						<span name="rskProdSignDesc" id="rskProdSignDesc"  style="color: red">
                                ${rskProdSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">Vin风险标记</div>
                        <div class="field">
                        <span name="rskVinSignDesc" id="rskVinSignDesc"  style="color: red">
                                ${rskVinSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">挂靠公司风险标记</div>
                        <div class="field">
                        <span name="rskLnkSignDesc" id="rskLnkSignDesc"  style="color: red">
                                ${rskLnkSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">供应商风险标记</div>
                        <div class="field">
                        <span name="rskSplSignDesc" id="rskSplSignDesc"  style="color: red">
                                ${rskSplSignDesc}
                        </span>
                        </div>
                    </div>
                    <div class="fieldBox col_100">
                        <div class="label">手机号风险标记</div>
                        <div class="field">
                        <span name="rskCstMpSignDesc" id="rskCstMpSignDesc"  style="color: red">
                                ${rskCstMpSignDesc}
                        </span>
                        </div>
                    </div>
                    <!-- begin add 信审遗留问题 by JL 20190819 -->
					<div class="fieldBox col_100">
						<div class="label" role="textclip">信审遗留问题</div>
						<div class="field">
							<textarea id="audRemainPro" name="audRemainPro" rows="2" class="ui-textarea l-textarea" style="width:96%"></textarea>
						</div>
					</div>
					<c:if test="${mdf_AudRemainPro==1}">
						<div class="fieldset1 clearFix">
					        <div class="btnsBox" style="text-align: center;">
						        <span id="saveAudRemainPro" class="sq-button sq-button-round" onclick="saveAudRemainPro();">保存信审遗留问题</span>
						    </div>
					    </div>
			        </c:if>
					<!-- end add 信审遗留问题 by JL 20190819 -->
                    
                    <c:if test="${isAuditNode==1}">
                        <c:if test="${splRiskWarnCd==1}">
                            <div class="fieldBox col_33">
                                <div class="label">供应商预警状态</div>
                                <div class="field">
                                    <span style='color:red'>高风险预警</span>
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${lnkRiskWarnCd==1}">
                            <div class="fieldBox col_33">
                                <div class="label">挂靠公司预警状态</div>
                                <div class="field">
                                    <span style='color:red'>高风险预警</span>
                                </div>
                            </div>
                        </c:if>
                    </c:if>
                </c:if>
                <c:if test="${capPayInfoVO.buOrgCd == '00000001'}">
                    <c:if test="${gpsFlag == 1}">
                        <div class="fieldBox col_33">
                            <div class="label">是否需要安装有线GPS</div>
                            <div class="field">
                                <span class="requiredSymbol" style="color: red">需装</span>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${gpsFlag == 2}">
                        <div class="fieldBox col_33">
                            <div class="label">是否需要安装有线GPS</div>
                            <div class="field">
                                <span class="requiredSymbol" style="color: green">免装</span>
                            </div>
                        </div>
                    </c:if>
                </c:if>
                <c:if test="${guaraStatus == 2}">
                    <div class="caption">
                        <span class="title">担保人信息</span>
                    </div>
                    <div id="guarantor" class="fieldBox col_100">
                        <div class="sqPanel">
                            <div class="sqPanel_body">
                                <div id="ligergrid_guarantor" class="sq-grid"></div>
                            </div>
                        </div>
                    </div>
                </c:if>
                	<div class="fieldBox col_100" id="pledgee">
		            <div class="label">抵押权人修改</div>
		            <div class="field" >
		            	<select name="pledgeeAuthNm" id="pledgeeAuthNm" data-value="${pledgeeAuthNm }" >
		                	<c:forEach items="${pledgeeNmList }" var="kv">
		                		<c:if test="${pledgeeAuthNm == kv.key }">
								<option value="${kv.key }" selected>${kv.value }</option>
								</c:if>
								<c:if test="${pledgeeAuthNm != kv.key }">
								<option value="${kv.key }">${kv.value }</option>
								</c:if>
							</c:forEach>
						</select>
		                <span id="addpledgeeAuthNmBtn" class="sq-button sq-button-round" onclick="addpledgeeAuthNm();" class="sq-button sq-button-round">保存</span>
		       		 </div>
		         </div>
            </div>

            <div>
                <div id="pageInTab" class="pageInTab">
                    <div tabid="payTab" title="付款通知" lselected="true">
                        <c:forEach var="accItem" items="${payeeList}">
                            <div class="fieldset1 tabel_col clearFix">
                                <div class="caption">
                                    <span class="title">${accItem.purpCdNm}信息</span>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">收款方类型</div>
                                    <div class="field">
                                        <input name="payeeTypCd${accItem.purpCd}" id="payeeTypCd${accItem.purpCd}"
                                               data-value="${accItem.payeeTypCd}" validate="{required:true}"
                                               placeholder="请选择" ltype="combobox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                </div>

                                <div class="fieldBox col_66">
                                    <div class="label">收款单位</div>
                                    <div class="field">
                                        <input name="rcptUnt${accItem.purpCd}" id="rcptUnt${accItem.purpCd}"
                                               data-value="${accItem.rcptUnt}" validate="{required:true}" type="text"
                                               class="ui-textbox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">账户类型</div>
                                    <div class="field">
                                        <input name="bkAccTypCd${accItem.purpCd}" id="bkAccTypCd${accItem.purpCd}"
                                               data-value="${accItem.bkAccTypCd}" validate="{required:true}"
                                               placeholder="请选择" ltype="combobox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                </div>
                                <div class="fieldBox col_66">
                                    <div class="label">开户行</div>
                                    <div class="field">
                                        <input name="payeeBkNm${accItem.purpCd}" id="payeeBkNm${accItem.purpCd}"
                                               data-value="${accItem.payeeBkNm}" validate="{required:true}" type="text"
                                               class="ui-textbox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">开户行号</div>
                                    <div class="field">
                                        <input name="payeeBkNo${accItem.purpCd}" id="payeeBkNo${accItem.purpCd}"
                                               data-value="${accItem.payeeBkNo}" validate="{required:true,number:true}"
                                               type="text" class="ui-textbox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                </div>
                                <div class="fieldBox col_66">
                                    <div class="label">收款账号</div>
                                    <div class="field">
                                        <input name="accNo${accItem.purpCd}" id="accNo${accItem.purpCd}"
                                               data-value="${accItem.accNo}" validate="{required:true,number:false}"
                                               type="text" class="ui-textbox">
                                        <span class="requiredSymbol">*</span>
                                    </div>
                                    <input id="payeeId${accItem.purpCd}" type="text" style="display: none;"
                                           value="${accItem.id}">
                                    <input id="bkId${accItem.purpCd}" type="text" style="display: none;"
                                           value="${accItem.bkId}">
                                    <input id="purpCd${accItem.purpCd}" type="text" style="display: none;"
                                           value="${accItem.purpCd}">
                                </div>
                                <input name="cstDbrId${accItem.purpCd}" id="cstDbrId${accItem.purpCd}" type="text" style="display: none;" value="${capPayInfoVO.cstDbrId}">
                            </div>
                        </c:forEach>

                        <div class="fieldset1 tabel_col clearFix">
                            <div class="fieldBox col_100">
                                <div class="label">付款备注</div>
                                <div class="field">
                                      <textarea name="payRem" id="payRem" class="ui-textarea l-textarea"
                                                value="${capPayInfoVO.payRem}"
                                                rows="2" cols="120" style="width: 97%;"
                                                validate="{required:false,maxlength:240}">${capPayInfoVO.payRem}</textarea>
                                </div>
                            </div>
                        </div>

                        <c:forEach var="accItem" items="${payeeList}">
                            <div class="fieldset1 tabel_col clearFix">
                                <div class="caption">
                                    <span class="title">付款信息(${accItem.purpCdNm})</span>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">应付款金额(元)
                                    </div>
                                    <div class="field">
                                        <input name="payAmts${accItem.purpCd}" id="payAmts${accItem.purpCd}"
                                               class="ui-textbox" value="" type="text" data-value="${accItem.payAmts}"
                                               data-tofix="2" validate="{required:true,number:true}" readonly>
                                               <c:if test="${installment == 1 && accItem.purpCd == 1}"><font color="red">已扣除保险首付款</font></c:if>
                                        <input id="payAmt${accItem.purpCd}" type="text" value="${accItem.payAmt}"
                                               style="display: none;">
                                        <input id="rebateAmt${accItem.purpCd}" type="text" value="${accItem.rebateAmt}"
                                               style="display: none;">
                                    </div>
                                </div>
                                <c:if test="${installment == 1 && accItem.purpCd == 1}">
	                                <div class="fieldBox col_33">
	                                    <div class="label">车贷付款金额(元)</div>
	                                    <div class="field">
	                                        <input name="amountPayableq" id="amountPayableq" 
	                                        	data-tofix="2" class="ui-textbox" type="text" data-value="${amountPayableq}" 
	                                        	validate="{required:false,number:true}" disabled>
	                                    </div>
	                                </div>
                                </c:if>
                                <div class="fieldBox col_66_auto">
                                    <div class="label">付款方式</div>
                                    <div class="field">
                                        <input id="payWayCd${accItem.purpCd}" name="payWayCd${accItem.purpCd}" data-value="${accItem.payWayCd}"
                                               validate="{required:false}" placeholder="请选择" ltype="combobox">
                                    </div>
                                </div>

                                <div class="fieldBox col_33">
                                    <div class="label">实付金额(元)</div>
                                    <div class="field">
                                        <input id="actPayAmt${accItem.purpCd}" name="actPayAmt${accItem.purpCd}" type="text" class="ui-textbox"
                                               data-tofix="2" data-value="${accItem.actPayAmts}"
                                               validate="{required:false,number:true}">
                                    </div>
                                </div>
								<c:if test="${installment == 1 && accItem.purpCd == 1}">
									<div class="fieldBox col_33">
	                                    <div class="label">保险分期首期款(元)</div>
	                                    <div class="field">
	                                        <input name="firstAmt" id="firstAmt" 
	                                        	data-tofix="2" class="ui-textbox" type="text" data-value="${firstAmt}" 
	                                        	validate="{required:false,number:true}" disabled>
	                                    </div>
	                                </div>
                                </c:if>
                                <c:choose>
                                    <c:when test="${accItem.purpCd == '5'}">
                                        <c:if test="${isModifyAmt == '0'}">
                                            <div class="fieldBox col_33">
                                                <div class="label">真实金额(元)</div>
                                                <div class="field">
                                                    <input id="realPayAmt${accItem.purpCd}" type="text" readonly=readonly class="ui-textbox" name="realPayAmt${accItem.purpCd}"
                                                           data-tofix="2" data-value="${accItem.mdfUsrId == null  ? "" : accItem.realPayAmts}"
                                                           validate="{required:false,number:true}">
                                                </div>
                                            </div>
                                        </c:if>
                                        <c:if test="${isModifyAmt == '1'}">
                                            <div class="fieldBox col_33">
                                                <div class="label">真实金额(元)</div>
                                                <div class="field">
                                                    <input id="realPayAmt${accItem.purpCd}"  type="text" class="ui-textbox" name="realPayAmt${accItem.purpCd}"
                                                           data-tofix="2" data-value="${accItem.mdfUsrId == null  ? "" : accItem.realPayAmts}"
                                                           validate="{required:true,number:true}">
                                                </div>
                                            </div>
                                        </c:if>
                                        <div class="fieldBox col_33">
                                            <div class="label">实付时间</div>
                                            <div class="field">
                                                <input name="actPayTms${accItem.purpCd}" id="actPayTms${accItem.purpCd}" type="text" class="ui-datepicker"
                                                       value="${accItem.actPayTms}" validate="{required:false}">
                                            </div>
                                        </div>
                                    </c:when>
                                    <c:otherwise>
                                        <div class="fieldBox col_66_auto">
                                            <div class="label">实付时间</div>
                                            <div class="field">
                                                <input id="actPayTms${accItem.purpCd}" name="actPayTms${accItem.purpCd}" type="text" class="ui-datepicker"
                                                       value="${accItem.actPayTms}" validate="{required:false}">
                                                <input id="realPayAmt${accItem.purpCd}" type="text" value="${accItem.realPayAmts}" style="display: none;">
                                            </div>
                                        </div>
                                    </c:otherwise>
                                </c:choose>
                            </div>
                        </c:forEach>
                        <c:if test="${installment == 1}">
                            <div class="fieldset1 tabel_col clearFix">
                                <div class="caption">
                                    <span class="title">保险分期放款账号信息</span>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">应付金额</div>
                                    <div class="field">
                                        <input name="amountPayable" id="amountPayable" 
                                        	data-tofix="2" class="ui-textbox" type="text" data-value="${totalAmt}" 
                                        	validate="{required:false,number:true}" disabled>
                                    </div>
                                </div>
                                <div class="fieldBox col_33">
                                    <div class="label">收款单位</div>
                                    <div class="field">
                                        <input id="compNm" type="text" class="ui-textbox"
                                               data-tofix="2" data-value="${insApplicationVO.compNm}"
                                               validate="{required:false,number:true}" disabled>
                                        <span class="requiredSymbol">*</span>
                                    </div>
                               	</div>
                               	
                               	<div class="fieldBox col_33">
									<div class="label">账户类型</div>
							            <div class="field">
							                <select name="isAnchored" id="isAnchored" data-value="0" validate="{required:true,select:true}" disabled="disabled">
													<option value="0">对公</option>
							                </select>
							                <span class="requiredSymbol">*</span>
							            </div>
								</div>
                               	<div class="fieldBox col_33">
                                    <div class="label">开户行</div>
                                    <div class="field">
                                        <input id="bkNm" type="text" class="ui-textbox"
                                               data-tofix="2" data-value="${insApplicationVO.bkNm}"
                                               validate="{required:false,number:true}" disabled>
                                         <span class="requiredSymbol">*</span>
                                    </div>
                               	</div>
                               	<div class="fieldBox col_33">
                                    <div class="label">开户行号</div>
                                    <div class="field">
                                        <input id="bkNo" type="text" class="ui-textbox"
                                               data-tofix="2" data-value="${insApplicationVO.bkNo}"
                                               validate="{required:false,number:true}" disabled>
                                         <span class="requiredSymbol">*</span>
                                    </div>
                               	</div>
                               	<div class="fieldBox col_33">
                                    <div class="label">收款账号</div>
                                    <div class="field">
                                        <input id="accNo" type="text" class="ui-textbox"
                                               data-tofix="2" data-value="${insApplicationVO.accNo}"
                                               validate="{required:false,number:true}" disabled>
                                         <span class="requiredSymbol">*</span>
                                    </div>
                               	</div>
                            </div>
                        </c:if>
                    </div>
                    <div tabid="leaseTab" title="租赁物信息(${capPayInfoVO.prdCount})">
                        <iframe frameborder="0" id="lease" name="lease" src=""></iframe>
                    </div>
                    <div tabid="hisTab" title="历史付款记录(${capPayInfoVO.payCount})">
                        <iframe frameborder="0" id="hispay" name="hispay" src=""></iframe>
                    </div>
                    <div tabid="mateTab" title="放款资料(${capPayInfoVO.fileCount})">
                        <iframe frameborder="0" id="material" name="material" src=""></iframe>
                    </div>
                    <div tabid="insTab" title="查看保单">
                        <iframe frameborder="0" id="insDtl" name="insDtl" src=""></iframe>
                    </div>
                    <div tabid="certTab" title="合格证">
                        <iframe frameborder="0" id="certDtl" name="certDtl" src=""></iframe>
                    </div>
                    <div tabid="invoiceTab" title="发票">
                        <iframe frameborder="0" id="invoiceDtl" name="invoiceDtl" src=""></iframe>
                    </div>
                    <div tabid="insTabA" title="查看分期申请">
                        <iframe frameborder="0" id="insFq" name="insFq" src=""></iframe>
                    </div>
                    <%--展示银行信息采集：所属机构为建行 ccbank时，
					当前合同号下其余支付表号放款状态都不是“未申请”或者“放款失败”的时候，放款申请显示银行信息采集标签页--%>
                    <c:if test="${isShowAccTab == '1'}">
                        <div tabid="AccTab" title="银行信息采集">
                            <iframe frameborder="0" id="accInsCfg" name="accInsCfg" src=""></iframe>
                        </div>
                    </c:if>
                    <c:if test="${QZTX==1}">
                    	<div tabid="startRentTab" title="起租提醒">
                        	<iframe frameborder="0" id="startRent" name="startRent" src=""></iframe>
                    	</div>
                    </c:if>
                    <c:if test="${not empty bizFlag and (bizFlag == '2' or bizFlag == 'icbc')}">
                        <div tabid="bankTab" title="银行代扣卡">
                            <iframe frameborder="0" id="bankDtl" name="bankDtl" src=""></iframe>
                        </div>
                    </c:if>
                </div>
            </div>

            <div class="btnsBox" style="text-align: center;">
                <span id="saveCapPayInfoBtn" class="sq-button sq-button-round">保存</span>
                <span id="startFlowBtn" class="sq-button sq-button-round">发起流程</span>
                <span id="backCapPayInfoBtn" class="sq-button sq-button-round">返回</span>
                <input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
                <c:if test="${showRec==1}">
                    <sys:funcAuth resCd="paySendToRecorder">
                        <span id="sendToRecorderBtn" class="sq-button sq-button-round">发送至录单员</span>
                    </sys:funcAuth>
                </c:if>
                <c:if test="${showHtOpn==1}">
                    <span id="contractOpn" class="sq-button sq-button-round"
                          onclick="contractOpnStart();">放款合同通过意见</span>
                </c:if>
                <c:if test="${showDyOpn==1}">
                    <span id="mortGageOpn" class="sq-button sq-button-round"
                          onclick="mortGageOpnStart();">放款抵押通过意见</span>
                </c:if>
                <c:if test="${showRejOpn==1}">
                    <span id="rejOpn" class="sq-button sq-button-round" onclick="rejOpnStart();">驳回意见</span>
                </c:if>
            </div>

            <input name="cstId" id="cstId" type="text" style="display: none;" value="${capPayInfoVO.cstId}">
            <input name="splId" id="splId" type="text" style="display: none;" value="${capPayInfoVO.splId}">
            <input name="flowKey" id="flowKey" type="text" style="display: none;" value="${flowKey}">
        </form>
    </div>
</div>

<script>
    var pageInTab = null;
    var pageInApp = {};
    var loadedTabs = [];
    var fields = ['payeeTypCd', 'rcptUnt', 'bkAccTypCd', 'payeeBkNm', 'payeeBkNo', 'accNo', 'payeeId', 'bkId', 'purpCd', 'payAmt', 'actPayAmt', 'actPayTms', 'payWayCd','realPayAmt'];
    var form = null;
    var counts = [];
    var bizFlag = '${bizFlag}';
    var isAddPayerStatusCd = '${isAddPayerStatusCd}';
    var payerStatusCd = '${payerStatusCd}';
    var bizTypCd = "${bizTypCd}";
    var paySchId = "${paySchId}";
    var paySchNo = "${paySchNo}";
    var lsDt = "${lsDt}";
    //是否可以修改交车时间
    var isNeedAddTime = '${isNeedAddTime}';
    var prjId = "${capPayInfoVO.prjId}";
    //担保人信息操作按钮展示状态
    var guaraStatus = '${guaraStatus}';
    if (guaraStatus==2){
        initGuarantorList();//初始化担保人列表
    }
    $(function () {
    	initPledgeeAuthNm();
    	
		initAudRemainPro(); //初始化"信审遗留问题字段"-JL-20190820
		
        var capPayInfoId = "${capPayInfoVO.id}";//主键ID
        var capPayStsCd = "${capPayInfoVO.payStsCd}";//付款状态
        var prjTypCd = "${capPayInfoVO.prjTypCd}";
        var isAllowPay = "${isAllowPay}";
        if (capPayStsCd && capPayStsCd != "1" && capPayStsCd != "4") {
            $("#startFlowBtn").hide();
        }
        if (isAllowPay === '0'){
            $("#startFlowBtn").hide();
        }

        if(prjTypCd==ProjectConstant.PRJ_TYP_CD_CDDYWUL||prjTypCd==ProjectConstant.PRJ_TYP_CD_ESCJYD || prjTypCd == ProjectConstant.PRJ_TYP_CD_OWNJYD){
            $("#isFstCol").attr('readonly',true);
        }
        //工行卡贷是否工行放款
        $("#payerStatusCd").ligerComboBox({isShowCheckBox: true, isMultiSelect: false,
            data: ${payerStatusCdList},
            valueField: 'key',
            textField:'value'
        });

        //工行放款时间及放款金额显示
        if(payerStatusCd != null && payerStatusCd == '2'){
            $("#ghAmt").css('display','block');
            $("#ghDt").css('display','block');
            $("#thdPayAmt").css('readonly','readonly');
            $("#thdPayDt").css('readonly','readonly');
        }
        function initPledgeeAuthNm(){
        	//默认页面上抵押权人修改是隐藏状态
        	$("#pledgee").hide();
        	$("#addpledgeeAuthNmBtn").hide();
        	if('${authNm}'==1){
        		$("#pledgee").show();
            	$("#addpledgeeAuthNmBtn").show();
            	/* if(authNm !='1'){
            		liger.get("opens_select").setDisabled(true);
            	} */
        	}
        }
        var pamt = parseInt('${capPayInfoVO.prdAmt}');//设备款
        var initamt = parseInt('${capPayInfoVO.initPayAmt}');//首期款
        var minusamt = parseInt('${capPayInfoVO.minusAmt}');//首期款不含咨询费

        $("#pAmt").text(FormatMoney(pamt / 100));
        $("#initPayAmt").text(FormatMoney(initamt / 100));
        $("#initFstShowAmt").text(FormatMoney((initamt - minusamt) / 100));

        $('#isFstCol').ligerCheckBox();

        <c:if test="${not empty accSize}">
        counts = ${accSize};
        </c:if>
        for (var i = 0; i < counts.length; i++) {
            $('#payeeTypCd' + counts[i]).ligerComboBox({
                valueField: 'key',
                textField: 'value'
            });
            $('#bkAccTypCd' + counts[i]).ligerComboBox({
                valueField: 'key',
                textField: 'value'
            });
            $("#payWayCd" + counts[i]).ligerComboBox({
                valueField: 'key',
                textField: 'value'
            });
        }

        form = $("#capPayInfo_form").ligerForm({
            validate: true
        });
        
        if('${buOrgCd}' == "00000013"){//新能源 -直租回显起租日
        	form.setData ({
        		lsDt:lsDt
        	})
        }
        //yaoxiurong 18/2/1 新能源 - 是否团单
        if('${capPayInfoVO.buOrgCd}'=="00000013"){
	        form.setData({
	        	isGrp:'${capPayInfoVO.isGrp}',
	        });
	        var saveIsGrp = '${saveIsGrp}';
	        if(saveIsGrp==1){
	        	liger.get("isGrp").setEnabled();
	        }else{
	        	liger.get("isGrp").setDisabled();
	        }
	        //新能源直租业务模式放款额=设备款，不可代扣
            if('${capPayInfoVO.prjTypCd}'=='ZS'||'${capPayInfoVO.prjTypCd}'=='ZL'||('${capPayInfoVO.prjTypCd}'=='CTYW' && ${isSplMfr} == 1)||('${capPayInfoVO.prjTypCd}'=='CPYW'  && ${isSplMfr} == 1)){
                $('#isFstCol').ligerCheckBox({
                    disabled:true
                });
            }
        }else if('${capPayInfoVO.buOrgCd}'=="00000001"){
            /*if('${capPayInfoVO.prjTypCd}'=='CSYWCT'||'${capPayInfoVO.prjTypCd}'=='CSYWCP'){
                $('#isFstCol').ligerCheckBox({
                    disabled:true
                });
            }*/
        }

        var accCtrl = '${accCtrl}';//收款账号控制
        if (accCtrl === "1") {//不可编辑
            $("#payRem").setDisabled_ligerTextarea(true);
        }
        var entrance = '${entrance}';//付款信息控制

        for (var j = 0; j < counts.length; j++) {
            liger.get("payeeTypCd" + counts[j]).setData(${payeeTypCdList});
            liger.get("bkAccTypCd" + counts[j]).setData(${bkAccTypCdList});
            liger.get("payWayCd" + counts[j]).setData(${payWayCdList});

            if (accCtrl === "1") {
                //账号都不可编辑
                liger.get("payeeTypCd" + counts[j]).setDisabled(true);
                liger.get("bkAccTypCd" + counts[j]).setDisabled(true);
                liger.get("rcptUnt" + counts[j]).setDisabled(true);
                liger.get("payeeBkNm" + counts[j]).setDisabled(true);
                liger.get("payeeBkNo" + counts[j]).setDisabled(true);
                liger.get("accNo" + counts[j]).setDisabled(true);
            } else {
                //账号都可编辑
                var payeeTypCd = liger.get("payeeTypCd" + counts[j]).getValue();
                if (payeeTypCd && payeeTypCd != 3) {
                    liger.get("bkAccTypCd" + counts[j]).setDisabled(true);
                    liger.get("payeeBkNm" + counts[j]).setDisabled(true);
                    liger.get("payeeBkNo" + counts[j]).setDisabled(true);
                    liger.get("accNo" + counts[j]).setDisabled(true);
                    // 2017-6-26 15:33:05 jiangzg modify
                    if (StringUtils.isNotEmpty(prjTypCd) && prjTypCd == "CPYW") {
                        liger.get("payeeTypCd" + counts[j]).setDisabled(true);
                        liger.get("rcptUnt" + counts[j]).setDisabled(true);
                    }
                }
                if(accCtrl === "2" && counts[j]==6) {
                    //车立行账号不可编辑
                    liger.get("payeeTypCd" + counts[j]).setDisabled(true);
                    liger.get("bkAccTypCd" + counts[j]).setDisabled(true);
                    liger.get("rcptUnt" + counts[j]).setDisabled(true);
                    liger.get("payeeBkNm" + counts[j]).setDisabled(true);
                    liger.get("payeeBkNo" + counts[j]).setDisabled(true);
                    liger.get("accNo" + counts[j]).setDisabled(true);
                }
                if(counts[j] == 11){
                    liger.get("payeeTypCd" + counts[j]).setDisabled(true);
                }
            }

            liger.get("actPayAmt" + counts[j]).setDisabled(true);
            liger.get("actPayTms" + counts[j]).setDisabled(true);
            liger.get("payWayCd" + counts[j]).setDisabled(true);
            liger.get("payAmts" + counts[j]).setDisabled(true);
            if (entrance === '1') {
                liger.get("actPayAmt" + counts[j]).setEnabled();
                liger.get("actPayTms" + counts[j]).setEnabled();
                liger.get("payWayCd" + counts[j]).setEnabled();
            } else if (entrance === '2') {//只编辑收款方应付金额
                if('' != bizFlag && null != bizFlag && '2' == bizFlag){
                    liger.get("payAmts1").setDisabled(true);
                }else{
                    liger.get("payAmts1").setEnabled();
                }
                $("#payAmts1").change(function () {
                    $(document).trigger('click');
                    var amts = $("#payAmts1").val();
                    amts = amts.replace(",", "");
                    $("#payAmt1").val(amts * 100);
                    $("#payAmt").val(amts * 100);
                });
            } else if (entrance === '3') {//只能编辑供应商返利金额
                var payAmts2 = liger.get("payAmts2");
                if (payAmts2) {
                    if('' != bizFlag && null != bizFlag && '2' == bizFlag){
                        payAmts2.setDisabled(true);
                    }else{
                        payAmts2.setEnabled();
                    }
                    $("#payAmts2").change(function () {
                        $(document).trigger('click');
                        var amts = $("#payAmts2").val();
                        amts = amts.replace(",", "");
                        amts = amts * 100;
                        var rebateAmt = $("#rebateAmt2").val();
                        if (amts > rebateAmt) {//编辑的金额不能大于支付表明细供应商返利金额
                            $.ligerDialog.SQalert({
                                content: "供应商返利金额不能大于" + FormatMoney(rebateAmt / 100) + "元",
                                SQ_type: "warning"
                            });
                            var payAmt2 = $("#payAmt2").val();
                            $("#payAmts2").val(FormatMoney(payAmt2 / 100));
                            return;
                        }
                        $("#payAmt2").val(amts);
                    });
                }
            }else if(entrance === '4'){
                //4.可以修改车立行账号实付时间和金额
                if(counts[j]==6){
                    liger.get("actPayAmt"+counts[j]).setEnabled();
                    liger.get("actPayTms"+counts[j]).setEnabled();
                    form.setFieldValidate("actPayAmt"+counts[j], {required: true,number:true});
                    form.setFieldValidate("actPayTms"+counts[j], {required: true});
                }
            }else if(entrance === '5'){
                //5.可以修改除车立行账号外的实付时间和金额
                if(counts[j]!=6){
                    liger.get("actPayAmt"+counts[j]).setEnabled();
                    liger.get("actPayTms"+counts[j]).setEnabled();
                    form.setFieldValidate("actPayAmt"+counts[j], {required: true,number:true});
                    form.setFieldValidate("actPayTms"+counts[j], {required: true});
                }
            }else if(entrance === '6'){
                //6.可以修改除车立行账号外的应付款金额
                if(counts[j]!=6) {
                    liger.get("payAmts" + counts[j]).setEnabled();
                    form.setFieldValidate("payAmts"+counts[j], {required: true,number:true});
                }
            }

            (function (j) {
                $("#payeeTypCd" + counts[j]).change(function () {
                    var payeeTypCd = liger.get("payeeTypCd" + counts[j]).getValue();
                    if (StringUtils.isNotEmpty(prjTypCd) && prjTypCd == "CPYW") {
                        return;
                    }
                    $("#rcptUnt" + counts[j]).val("");
                    $("#bkAccTypCd" + counts[j]).val("");
                    $("#payeeBkNm" + counts[j]).val("");
                    $("#payeeBkNo" + counts[j]).val("");
                    $("#accNo" + counts[j]).val("");
                    if (payeeTypCd == 3) {
                        liger.get("bkAccTypCd" + counts[j]).setEnabled();
                        liger.get("payeeBkNm" + counts[j]).setEnabled();
                        liger.get("payeeBkNo" + counts[j]).setEnabled();
                        liger.get("accNo" + counts[j]).setEnabled();
                    } else {
                        liger.get("bkAccTypCd" + counts[j]).setDisabled(true);
                        liger.get("payeeBkNm" + counts[j]).setDisabled(true);
                        liger.get("payeeBkNo" + counts[j]).setDisabled(true);
                        liger.get("accNo" + counts[j]).setDisabled(true);
                    }
                    if(StringUtils.isNotEmpty(prjTypCd) && prjTypCd == "CDDYWUL"){
                        if(payeeTypCd == 8){//担保人
                            var prjId = '${capPayInfoVO.prjId}';//项目ID
                            $.ligerDialog.SQopen({
                                width: 850,
                                height: 350,
                                title: '担保人列表',
                                url: '<%=path%>/project/prjcstbscInfo/prjCstForDbr.do?prjId=' + prjId + '&purpCd=' + counts[j]
                            });
                        }
                    }
                });

                //选择
                $("#rcptUnt" + counts[j]).click(function (event) {
                    var payeeTypCd = liger.get("payeeTypCd" + counts[j]).getValue();
                    if (!payeeTypCd) {
                        $.ligerDialog.SQalert({content: "请先选择收款方类型", SQ_type: "warning"});
                        return;
                    }
                    if (payeeTypCd == 3) {
                        return;
                    }
                    if (StringUtils.isNotEmpty(prjTypCd) && prjTypCd == "CPYW") {
                        return;
                    }
                    var cstId = $("#cstId").val();//客户ID
                    if(payeeTypCd == 8){//担保人
                        cstId =  $("#cstDbrId"+counts[j]).val();//担保人
                    }
                    var splId = $("#splId").val();//供应商ID
                    var onOk = function (item, Dialog) {
                        //在子页面里绑定 frameElement.dialog.onOk = function () {}
                        if (Dialog.onOk) Dialog.onOk();
                    };
                    var onCancel = function (item, Dialog) {
                        //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                        if (Dialog.onCancel) Dialog.onCancel();
                    };
                    $.ligerDialog.SQopen({
                        width: 850,
                        height: 350,
                        title: '收款账户列表',
                        url: '<%=path%>/capital/capPayeeInfo/toChoosePayee.do',
                        buttons: [
                            {
                                text: "确定", onclick: onOk, type: 'ok', cls: 'l-dialog-btn-ok'
                            }, {
                                text: "关闭", onclick: onCancel, type: 'cancel', cls: 'l-dialog-btn-no'
                            }
                        ],
                        data: {payeeTypCd: payeeTypCd, cstId: cstId, splId: splId, purpCd: counts[j],paySchId : $("#paySchId").val(),prjPrdDtlId:$("#prjPrdDtlId").val(),orgCd:"${capPayInfoVO.cstMgrOrgCd}"}
                    });
                });
            })(j);
        }

        /*是否代收首期款*/
        $("#isFstCol").change(function () {
            var amt = parseInt('${capPayInfoVO.payAmt}');//原应收金额
            if (this.checked) {
                if(('${capPayInfoVO.prjTypCd}'=='CTYW' && ${isSplMfr} == 1) || ('${capPayInfoVO.prjTypCd}'=='CPYW' && ${isSplMfr} == 1)){
                    if('${capPayInfoVO.isFstCol}'=='0'){
                        $("#payAmts1").val(FormatMoney((amt - initamt) / 100));//应付款=原应收金额-首付款
                        $("#payAmt1").val(amt - initamt);
                        $("#payAmt").val(amt - initamt);
                    }else{
                        $("#payAmts1").val(FormatMoney(amt / 100));//应付款=原应收金额
                        $("#payAmt1").val(amt);
                        $("#payAmt").val(amt);
                    }
                }else{
                    $("#payAmts1").val(FormatMoney((pamt - initamt) / 100));//应付款=设备款-首付款
                    $("#payAmt1").val(pamt - initamt);
                    $("#payAmt").val(pamt - initamt);
                }
            } else {
                if(('${capPayInfoVO.prjTypCd}'=='CTYW' && ${isSplMfr} == 1) || ('${capPayInfoVO.prjTypCd}'=='CPYW' && ${isSplMfr} == 1)){
                    if('${capPayInfoVO.isFstCol}'=='1'){
                        $("#payAmts1").val(FormatMoney((amt + initamt) / 100));//应付款=原应收金额+首付款
                        $("#payAmt1").val(amt + initamt);
                        $("#payAmt").val(amt + initamt);
                    }else{
                        $("#payAmts1").val(FormatMoney(amt / 100));//应付款=原应收金额
                        $("#payAmt1").val(amt);
                        $("#payAmt").val(amt);
                    }
                }else{
                    $("#payAmts1").val(FormatMoney(pamt / 100));//应付款=设备款
                    $("#payAmt1").val(pamt);
                    $("#payAmt").val(pamt);
                }
            }
        });

        //上传控制
        var ctrlKey = '${ctrlKey}';
        pageInTab = $("#pageInTab").ligerTab({
            height: 'auto',
            contextmenu: false,
            minIframeHeight: GET_minIframeHeight(),
            onAfterSelectTabItem: function (tabid) {
                if (loadedTabs.indexOf(tabid) < 0) {
                    loadedTabs.push(tabid);
                    if (tabid != "payTab") {
                        switch (tabid) {
                            case "leaseTab":
                                if (ctrlKey === '3') {
                                    pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toLeaseListPage.do?paySchId=${capPayInfoVO.paySchId}&isAuditNode=${isAuditNode}&isAllowPay=" +isAllowPay);
                                } else {
                                    pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjprdvehinfo/toCompPrdInfoListPage.do?dtlId=${capPayInfoVO.prjPrdDtlId}&isAuditNode=${isAuditNode}");
                                }
                                break;
                            case "hisTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toHisPayListPage.do?id=${capPayInfoVO.id}&paySchId=${capPayInfoVO.paySchId}");
                                break;
                            case "mateTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toMateListPage.do?id=${capPayInfoVO.id}&payStsCd=${capPayInfoVO.payStsCd}&ctrlKey=${ctrlKey}" +
                                        "&prjPrdDtlId=${capPayInfoVO.prjPrdDtlId}&cstId=${capPayInfoVO.cstId}&prjId=${capPayInfoVO.prjId}&cstMgrOrgCd=${capPayInfoVO.cstMgrOrgCd}&prjTypCd=${capPayInfoVO.prjTypCd}&paySchNo=${capPayInfoVO.paySchNo}");
                                break;
                            case "insTab":
                                var operateInsPlc = '${operateInsPlc}';
                            	if(operateInsPlc==1){
	                                pageInTab.setTabItemSrc(tabid, "<%=path%>/insurance/insPlcBscInfo/toPlcPage.do?paySchId=${capPayInfoVO.paySchId}&operateInsPlc=${operateInsPlc}");
   			                   	}else{
                                	pageInTab.setTabItemSrc(tabid, "<%=path%>/insurance/insPlcBscInfo/toPlcListPage.do?paySchId=${capPayInfoVO.paySchId}");
   			                   	}
                                break;
                            case "certTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjprdvehinfo/toPrjPrdVehInfoListInFlow.do?isGpsNode=${isGpsNode}&paySchNo=${capPayInfoVO.paySchNo}&isAuditNode=${isAuditNode}&isAllowPay=" + isAllowPay);
                                break;
                            case "invoiceTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjPrdInvoice/toflowListPage.do?paySchNo=${capPayInfoVO.paySchNo}&isAllowPay=" + isAllowPay);
                                break;
                            case "insTabA":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/inscare/insapplication/toInsApplicationStagingPage.do?prjId=${capPayInfoVO.prjId}&paySchNo=${capPayInfoVO.paySchNo}");
                                break;
                            case "startRentTab":
                            	pageInTab.setTabItemSrc(tabid, "<%=path%>/risk/rskCommRec/toStartRentPage.do?cstId=${capPayInfoVO.cstId}&paySchId=${capPayInfoVO.paySchId}");
                                break;
                            case "bankTab":
                                <c:choose>
                                    <c:when test="${capPayInfoVO.payStsCd != null && (capPayInfoVO.payStsCd == '2' || capPayInfoVO.payStsCd == '3' || capPayInfoVO.payStsCd == '5')}">
                                        <c:if test="${isAddBank == '1'}">
                                            pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toAddCorpBankInfo.do?paySchId=${capPayInfoVO.paySchId}");
                                        </c:if>
                                        <c:if test="${isAddBank == '0'}"> // toCorpBankInfoDetail
                                            pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toCorpBankInfoDetail.do?paySchId=${capPayInfoVO.paySchId}");
                                        </c:if>
                                    </c:when>
                                    <c:otherwise>
                                        <c:if test="${isAddBank == '1'}">
                                            pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toAddCorpBankInfo.do?paySchId=${capPayInfoVO.paySchId}");
                                        </c:if>
                                        <c:if test="${isAddBank == '0'}">
                                            pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toCorpBankInfoDetail.do?paySchId=${capPayInfoVO.paySchId}");
                                        </c:if>
                                    </c:otherwise>
                                </c:choose>
                                break;
                            case "AccTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/capPay/flow/toAccInsCfgPage.do?prjId=${capPayInfoVO.prjId}&&isShowSaveBtn=" + "1" + "&&isAllowPay=" + isAllowPay);
                                break;
                        }
                    }
                }
                SetIframe_height();
            }
        });

        $.extend(true, pageInApp, {
            pageInTab: pageInTab
        });

        $("#pageloading").hide();

        if (accCtrl === '1' && entrance === '0') {
            $("#saveCapPayInfoBtn").hide();
            $("#backCapPayInfoBtn").hide();
        }

        if("${isModifyAmt}"==="1" || isAddPayerStatusCd == '1'){
            $("#saveCapPayInfoBtn").show();
        }

        if(isNeedAddTime==='1'){
            $("#saveCapPayInfoBtn").show();
        }

        var buOrgcd = "${capPayInfoVO.buOrgCd}";
        var payeeId1 = $("#payeeId1").val();
        var rcptUnt1 = $("#rcptUnt1").val();
        if(buOrgcd==="00000005"&&StringUtils.isNotEmpty(payeeId1)){
            //汽车金融不允许修改收款账户
            if(StringUtils.isNotEmpty(rcptUnt1)){
                liger.get("payeeTypCd1").setDisabled(true);
                liger.get("rcptUnt1").setDisabled(true);
                $('#rcptUnt1').unbind("click"); //移除click
            }
        }

        /*保存*/
        $("#saveCapPayInfoBtn").click(function (event) {
            //$(document).trigger('click');
            opt('<%=path%>/capital/capPayInfo/modify.do?id=' + capPayInfoId +'&isAddPayerStatusCd='+isAddPayerStatusCd, 1);
        });

        /*返回*/
        $("#backCapPayInfoBtn").click(function (event) {
            Remove_navTab();
        });

        /*发送至录单员*/
        $("#sendToRecorderBtn").click(function (event) {
            $.ligerDialog.confirm('确定发送至录单员吗？', function (flag) {
                if (flag == false) {
                    return;
                }
                //付款类型: 正常放款,提前付款,特殊放款
                var payTypCd = $('#payTypCd').val();
                if (!payTypCd) {
                    top.$.ligerDialog.SQalert({content: "付款类型不能为空，发送失败！", SQ_type: "error"});
                    return false;
                }
                //流程key
                var procDefKey = $('#flowKey').val();
                //台账类型
                var bookTypeCd = "7";
                var wait_dialog;
                $.ajax({
                    type: 'post',
                    dataType: 'json',
                    data: {
                        payId: '${capPayInfoVO.id}',
                        prjId: '${capPayInfoVO.prjId}',
                        payTypCd: payTypCd,
                        procDefKey: procDefKey,
                        bookTypeCd: bookTypeCd
                    },
                    url: '<%=path%>/audit/audStandingBook/sendToRecoder.do',
                    beforeSend: function () {
                        wait_dialog = $.ligerDialog.SQalert({
                            content: LogUtils.LOG_CMM_DATA_LOADING,
                            SQ_type: "waitting"
                        });
                    },
                    success: function (msg) {
                        wait_dialog.close();
                        if (msg.success == 1) {
                            //隐藏发送至录单员按钮
                            $("#sendToRecorderBtn").hide();
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        } else {
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error", SQ_showButtons: true});
                        }
                    }
                });
            });
        });

        /*发起流程*/
        $("#startFlowBtn").click(function (event) {
            var prjTypCd = '${capPayInfoVO.prjTypCd}';
            var prjPrdDtlId = '${capPayInfoVO.prjPrdDtlId}';
            var prjId = '${capPayInfoVO.prjId}';
            var paySchNo = '${capPayInfoVO.paySchNo}';
            //除车抵贷线下、二手车交易贷，均需上传合格证 所有项目必须上传设备发票原件
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: {prjPrdDtlId: prjPrdDtlId, prjId: prjId, paySchNo: paySchNo},
                url: '<%=path%>/capital/capPayInfo/selectVehInfoByPrjPrdDtlId.do',
                success: function (msg) {
                    if (msg.success == 1) {
                        if (prjTypCd != ProjectConstant.PRJ_TYP_CD_CDDYWUL && prjTypCd != ProjectConstant.PRJ_TYP_CD_ESCJYD && prjTypCd != ProjectConstant.PRJ_TYP_CD_OWNJYD) {
                            if (CollectionUtils.isEmpty(msg.data.vehInfoFileList)) {
                                top.$.ligerDialog.SQalert({content: "合格证未上传不允许发起流程!", SQ_type: "error"});
                                return;
                            }
                        }
                        /*if (StringUtils.isEmpty(msg.data.invoiceFileId)) {
                            top.$.ligerDialog.SQalert({content: "设备发票原件未上传不允许发起流程!", SQ_type: "error"});
                            return;
                        }*/
                        checkStartFlow();
                    }
                }
            });
        });

        function checkStartFlow() {
            var payTypCd = $('#payTypCd').val();
            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: {
                    buOrgCd: '${capPayInfoVO.buOrgCd}',
                    prjTypCd: '${capPayInfoVO.prjTypCd}',
                    paySchId: '${capPayInfoVO.paySchId}',
                    prjPrdDtlId: '${capPayInfoVO.prjPrdDtlId}',
                    prjPrdId: '${capPayInfoVO.prjPrdId}',
                    prjId: '${capPayInfoVO.prjId}',
                    payTypCd: payTypCd
                },
                url: '<%=path%>/insurance/insTypCfgR/validate.do',
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        var tip = "";
                        // 发起随州垫款流程弹窗校验
                        var expatriateFlowAuth = false;
                        if (payTypCd == 1) {
                            tip = "是否确认发起正常放款流程？"
                        } else if (payTypCd == 2) {
                            tip = "是否确认发起提前放款流程？"
                            // 弹窗：是否同时发起随州垫款流程
                            $.ajax({
                                type: 'post',
                                dataType: 'json',
                                async: false,
                                data: {
                                    prjId: '${capPayInfoVO.prjId}',
                                    capPayId: '${capPayInfoVO.id}'
                                },
                                url: '<%=path%>/project/audit/checkExpatriateFlowAuth.do?',
                                success: function (data) {
                                    if (data.success == 1) {
                                        // 可发起，垫款弹窗
                                        expatriateFlowAuth = true;
                                    }
                                }
                            });
                        } else if (payTypCd == 3) {
                            tip = "是否确认发起特殊放款流程？";
                        } else if (payTypCd == 4) {
                            tip = "是否确认发起提前放款(需上牌)流程？";
                        }else if(payTypCd == 5){
                            tip = "是否确认发起准时放款流程？";
                        }
                        var startExpatriateFlow = 0;
                        // 可发起
                        if (expatriateFlowAuth) {
                            expatriateFlowDialog (FlowConstant.EXPATRIATE_FLOW_ADD_START_CONFIRM, '提示', function (flag) {
                                if (flag == true) {
                                    // 发起垫款标识
                                    startExpatriateFlow = 1;
                                    // 发起流程确认
                                    opt('<%=path%>/capital/capPayInfo/payApply.do?id=' + capPayInfoId + '&startExpatriateFlow=' + startExpatriateFlow, 2);
                                } else {
                                    // 发起流程确认
                                    opt('<%=path%>/capital/capPayInfo/payApply.do?id=' + capPayInfoId, 2);
                                }
                            }, $.ligerDefaults.ButtonStrings.yes, $.ligerDefaults.ButtonStrings.onlyAP);
                        } else {
                            $.ligerDialog.confirm(tip, function (flag) {
                                if (flag == false) {
                                    return;
                                } else {
                                    // 发起流程确认
                                    opt('<%=path%>/capital/capPayInfo/payApply.do?id=' + capPayInfoId, 2);
                                }
                            });
                        }
                        <%--$.ligerDialog.confirm(tip, function (flag) {--%>
                        <%--    if (flag == false)return;--%>
                        <%--    opt('<%=path%>/capital/capPayInfo/payApply.do?id=' + capPayInfoId, 2);--%>
                        <%--});--%>
                    } else {
                        top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error", SQ_showButtons: true,});
                    }
                }
            });
        }
    });
//初始化担保人列表
function initGuarantorList(){
	if(!prjId)return;
	guarantorGrid = $("#ligergrid_guarantor").ligerGrid({
        url: '<%=path%>/project/prjcstbscInfo/initGuarantorList.do',
        method: 'get',
        parms:{
        	prjId:prjId,
        	cstRlTyp:ProjectConstant.CST_RL_SPONSOR
        },
        columns: [
            {display: '担保人姓名', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h ='';
            		if(rowdata.cstTypCd==1){
                    	h+='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                    	h+="'"+"reCstNm"+"','"+rowdata.cstNm+"')";
                    	h+='"><i class="sqBtnIco_1"></i></a>';
                    	h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                    }
                    if(rowdata.cstTypCd==2){
                    	h+='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                    	h+="'"+"reCstNm"+"','"+rowdata.cstNm+"')";
                    	h+='"><i class="sqBtnIco_1"></i></a>';
                    	h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                    }
            		h+='<a href="javascript:toGuarantorDetail(';
                    h+=rowdata.id;
                    h+=","+rowdata.cstTypCd;
                    h+=')">'+rowdata.cstNm+'</a>';
                return h;
            	}
            },
            {display: '担保人身份证号', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.certNo)){
                        h='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                        h+="'"+"reCertNo"+"','"+rowdata.certNo+"')";
                        h+='"><i class="sqBtnIco_1"></i></a>';
                        h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                        h+=rowdata.certNo;
            		}
            		return h;
            	}
            },
            {display: '联系方式', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h = '';
            		if(rowdata.cstNpBscInfoVO){
            			var cstNpBscInfoVO = rowdata.cstNpBscInfoVO;
            			if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.mp1)){
            				h = '' + cstNpBscInfoVO.mp1 + '';
            			}else if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.mp2)){
            				h = '' + cstNpBscInfoVO.mp2 + '';
            			}
            		}else if(rowdata.cstCorpBscInfoVO){
            			var cstCorpBscInfoVO = rowdata.cstCorpBscInfoVO;
            			if(cstCorpBscInfoVO && StringUtils.isNotEmpty(cstCorpBscInfoVO.officeTel)){
            				h = '' + cstCorpBscInfoVO.officeTel + '';
            			}
            		}
            		if(StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"reMp1"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
                	return h;
            	}
            },
            {display: '联系地址', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h = '';
            		if(rowdata.cstNpBscInfoVO){
            			var cstNpBscInfoVO = rowdata.cstNpBscInfoVO;
            			if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.homeAddr)){
            				h = '' + cstNpBscInfoVO.homeAddr + '';
            			}
            		}else if(rowdata.cstCorpBscInfoVO){
            			var cstCorpBscInfoVO = rowdata.cstCorpBscInfoVO;
            			if(cstCorpBscInfoVO && StringUtils.isNotEmpty(cstCorpBscInfoVO.officeAddr)){
            				h = '' + cstCorpBscInfoVO.officeAddr + '';
            			}
            		}
            		if(StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"rePostAddr"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
                	return h;
            	}
            },
            {display: '担保人婚姻状况', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO) && StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO.marStsCdNm)){
            			h = ''+rowdata.cstNpBscInfoVO.marStsCdNm+'';
            		}
            		return h;
            	}
            },
            {display: '担保人配偶姓名', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO) && StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO.cstNpSocialRlVO)){
            			h = ''+rowdata.cstNpBscInfoVO.cstNpSocialRlVO.rlNm+'';
            		}
            		if(StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"reCstNm"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
            		return h;
            	},
           	},
			{display: '合同签署状态', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.prjCstBscInfoVO.conSignStsNm)){
            			h = ''+rowdata.prjCstBscInfoVO.conSignStsNm+'';
            		}
            		return h;
            	}
            },
			{display: '担保属性', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.prjCstBscInfoVO.guaraTypCdNm)){
            			h = ''+rowdata.prjCstBscInfoVO.guaraTypCdNm+'';
            		}
            		return h;
            	}
            },
            {display: '签署方式', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.prjCstBscInfoVO.cntTypCdNm) ){
            			h = ''+rowdata.prjCstBscInfoVO.cntTypCdNm+'';
            		}
            		return h;
            	}
            },
			getNpGuarColumn()
            ],
        onBeforeEdit: function (e) {},
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}
//获取操作列
function getNpGuarColumn(){
	var column = {
		display: '操作',
		isSort: false,
		width: 250,
		align:'left',
		render: function (rowdata, rowindex, value){
			var h="";
			if(rowdata.id && rowdata.cstNpBscInfoVO){
                if((guaraStatus==3) && (StringUtils.isEmpty(rowdata.prjCstBscInfoVO.conSignSts) || rowdata.prjCstBscInfoVO.conSignSts==0)){
                    h+='<a class="sq-button-hasicon" href="javascript:removeBtn(';
                    h+="'"+rowdata.prjCstBscInfoVO.id+"',";
                    h+= "'"+rowdata.prjCstBscInfoVO.isPushCon + "',";
                    h+= "'"+rowdata.prjCstBscInfoVO.guaraTypCd + "'";
                    h+=')"><i class="sqBtnIco_7"></i>删除</a>'
                }
                if((guaraStatus==3 || guaraStatus==2) && (StringUtils.isEmpty(rowdata.prjCstBscInfoVO.conSignSts) || rowdata.prjCstBscInfoVO.conSignSts==0)){
                    h+='<a class="sq-button-hasicon" href="javascript:modifyNpGuarBtn(';
                    h+="'"+rowdata.prjCstBscInfoVO.id+"',";
                    h+= "'"+rowdata.prjCstBscInfoVO.isPushCon + "',";
                    h+="'"+rowdata.cstNpBscInfoVO.mp1+"',";
                    h+=')"><i class="sqBtnIco_4"></i>修改</a>'
                }
                h+='<a class="sq-button-hasicon" href="javascript:detailNpGuarBtn(';
                h+="'"+rowdata.prjCstBscInfoVO.id+"',";
                h+="'"+rowdata.cstNpBscInfoVO.mp1+"',";
                h+=')"><i class="sqBtnIco_2"></i>查看</a>'
                if (rowdata.prjCstBscInfoVO.cntTypCd==1 && (StringUtils.isEmpty(rowdata.prjCstBscInfoVO.conSignSts) || rowdata.prjCstBscInfoVO.conSignSts==0) && rowdata.prjCstBscInfoVO.isPushCon==0) {
                    h+='<a class="sq-button-hasicon" href="javascript:pushCon(';
                    h+="'"+rowdata.prjCstBscInfoVO.id+"',";
                    h+="'"+rowdata.prjCstBscInfoVO.guaraTypCd+"'";
                    h+=')"><i class="sqBtnIco_3"></i>推送合同</a>'
                }
            }
		 	return h;
		}
	}
	return column;
}
//查看担保人信息
function detailNpGuarBtn(id,mp1){
		var  url = '<%=path%>/project/prjcstbscInfo/detailNpGuarPage.do?id='+id+'&&mp1='+mp1+'&&showGuarPart='+'1';//showGuarPart=1不展示部分担保人信息
		$.ligerDialog.SQopen({
            height:300,
            width: 600,
            title : '查看担保人信息',
            url: url,
            showMax: false,
            showToggle: true,
            showMin: false,
            isResize: true,
            slide: false,
        });
	}
//修改担保人信息
function modifyNpGuarBtn(id,isPushCon,mp1){
	var  url = '<%=path%>/project/prjcstbscInfo/modifyNpGuarPage.do?id='+id+'&&mp1='+mp1+'&&showGuarPart='+'1'+'&&prjId='+prjId +'&&isPushCon='+isPushCon+'&&onlyConTyp='+'1';
	$.ligerDialog.SQopen({
		height:300,
		width: 600,
		title : '修改担保人信息',
		url: url,
		showMax: false,
		showToggle: true,
		showMin: false,
		isResize: true,
		slide: false,
	});
}
//推送担保合同
function pushCon(id,guaraTypCd){
    if (!id){
        return;
    }
    var params = {};
    params.id = id;
    params.guaraTypCd = guaraTypCd;
    $.ajax({
        type: 'post',
        dataType:'json',
        data:params,
        url: '<%=path%>/project/prjcstbscInfo/pushCon.do',
        success:function(msg){
             if(msg.success == 1){
                 if(cstTypCd=ProjectConstant.CST_TYP_CD_NP){
                     liger.get("ligergrid_guarantor").reload();
                    };
             }else{
                 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
             }
        }
    });
}
//删除所选项目客户信息
function removeBtn(id,isPushCon,guaraTypCd){
	$.ligerDialog.confirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
	if(!id || id=="undefined"){
		var manager = $("#ligergrid_guarantor").ligerGetGridManager();
		manager.deleteSelectedRow();
		return;
	}
	if(flag == false)return;
    var params = {};
    params.guaraTypCd = guaraTypCd;
    params.prjId = prjId;
    params.isPushCon = isPushCon;
    params.id = id;
	$.ajax({
		type: 'post',
		dataType:'json',
		data:params,
		url: '<%=path%>/project/prjcstbscInfo/removeCstAndDelCont.do',
		success:function(msg){
			 if(msg.success == 1){
				 liger.get("ligergrid_guarantor").reload();
			 }else{
				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
			 }
		}
		});
	});
}
//担保人详情
function toGuarantorDetail(_cstId,_cstTypCd){
	if(!_cstId || !_cstTypCd)return;
	if(_cstTypCd == 1){
		Add_navTab('tab_customer_np_detail'+_cstId,'担保人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoNpDetailPage.do?id='+_cstId);
	}else if(_cstTypCd == 2){
		Add_navTab('tab_customer_corp_detail'+_cstId,'担保人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoCorpDetailPage.do?id='+_cstId);
	}
}
//查询项目信息(查重)
function toRePrjPageList(type,value){
	var _cstId = $("#cstId").val();
	var _cstTypCd = $("#cstTypCd").val();
	if(StringUtils.isEmpty(_cstId) || StringUtils.isEmpty(_projectId) || StringUtils.isEmpty(_cstTypCd))return;
	Add_navTab('tab_re_prj'+'-'+type+_cstId,'查重页面','<%=path%>/project/prjbscinfo/toRePrjListPage.do?id='+_cstId+'&cstTypCd='+_cstTypCd+'&prjId='+_projectId+'&type='+type+'&value='+value);
}
    // 自定义按钮文本
    $.ligerDefaults.ButtonStrings = {
        yes: '是',
        onlyHTCity: '否,仅发起城配流程',
        onlyAP: '否,仅发起提前放款'
    };
    // 自定义按钮的弹出框
    function expatriateFlowDialog (content, title, callback, left, right)
    {
        if (typeof (title) == "function")
        {
            callback = title;
            type = null;
        }
        var btnclick = function (item, Dialog)
        {
            Dialog.close();
            if (callback)
            {
                callback(item.type == 'ok');
            }
        };
        p = {
            type: 'question',
            content: content,
            buttons: [
                {
                    text: left, onclick: btnclick, type: 'ok', cls: 'l-dialog-btn-ok'
                }, {
                    text: right, onclick: btnclick, type: 'no', cls: 'l-dialog-btn-no'
                }
            ]
        };
        if (typeof (title) == "string" && title != "") p.title = title;
        $.extend(p, {
            showMax: false,
            showToggle: false,
            showMin: false,
            width: 300,
            height: 100

        });
        return $.ligerDialog(p);
    };
	//当前tab刷新
	function callback() {
        window.location.reload();
    }
    /**新增上牌信息*/
    function addSp(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'sp_info_add','添加上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId,callback);
    }
    /**修改上牌信息*/
    function modifySp(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'sp_info_add','修改上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId,callback);
    }
    /**查看上牌信息*/
    function showSp(_prjPrdDtlId){
    	var detailFlag = true;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
    	Add_navTab( 'sp_info_add','查看上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&checkSp=${checkSp}&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId, callback);
    }
    /**新增抵押信息*/
    function addDy(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'dy_info_add','添加抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&canUpdateMtg=${canUpdateMtg}',callback);
    }
    /**修改抵押信息*/
    function modifyDy(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'dy_info_add','修改抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId+'&canUpdateMtg=${canUpdateMtg}',callback);
    }
    /**查看抵押信息*/
    function showDy(_prjPrdDtlId){
    	var detailFlag = true;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
    	Add_navTab( 'dy_info_add','查看抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&checkDy=${checkDy}&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId+'&canUpdateMtg=${canUpdateMtg}', callback);
    }
    
    function opt(_url, _typ) {
        if (!form.valid()) {
            $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
            return false; //验证不通过，不执行以下代码
        }
        //保存交车时间
        if(isNeedAddTime==='1'){
            var dueDt = $("#dueDt").val();
            if('${buOrgCd}' == "00000013" && bizTypCd == '1'){//新能源直租
        		var lsDt = $("#lsDt").val();//起租日
            	if(lsDt == null || lsDt ==""){
            		$.ligerDialog.SQalert({content: "请选择起租日.", SQ_type: "warning"});
            		return ;
            	}
            	$.ajax({
                    type: 'post',
                    dataType: 'json',
                    data: {'dueDt':dueDt,'prjPrdDtlId':'${capPayInfoVO.prjPrdDtlId}','lsDt':lsDt,'paySchIds':paySchId},
                    url: '<%=path%>/capital/capPayInfo/modifyDueDt.do?id=${capPayInfoVO.id}',
                    beforeSend: function () {
                        wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                    },
                    success: function (msg) {
                        wait_dialog.close();
                        if (msg.success == 1) {
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        }else{
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error", SQ_showButtons: true});
                        }
                    }
                });
        	}else{
        		$.ajax({
                    type: 'post',
                    dataType: 'json',
                    data: {'dueDt':dueDt,'prjPrdDtlId':'${capPayInfoVO.prjPrdDtlId}'},
                    url: '<%=path%>/capital/capPayInfo/modifyDueDt.do?id=${capPayInfoVO.id}',
                    beforeSend: function () {
                        wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                    },
                    success: function (msg) {
                        wait_dialog.close();
                        if (msg.success == 1) {
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        }else{
                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error", SQ_showButtons: true});
                        }
                    }
                });
        	}
            
            return;
        }

        var data = form.getData();
        data['payeeList'] = JSON.stringify(getFieldsetsValues(fields, counts));

        var req = [];
        req['payeeList'] = JSON.stringify(getFieldsetsValues(fields, counts));
        req['buOrgCd'] = data['buOrgCd'];
        req['cstMgrOrgCd'] = data['cstMgrOrgCd'];
        req['flowKey'] = data['flowKey'];
        req['isFstCol'] = data['isFstCol'];
        req['payRem'] = data['payRem'];
        req['payStsCd'] = data['payStsCd'];
        req['payTypCd'] = data['payTypCd'];
        req['payAmt'] = data['payAmt'];

        $.ligerDialog.hide();
        var wait_dialog;
        $.ajax({
            type: 'post',
            dataType: 'json',
            data: data,
            url: _url,
            beforeSend: function () {
                wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
            },
            success: function (msg) {
                wait_dialog.close();
                if (msg.success == 1) {
                    if (_typ == 1) {
                        top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        var resp = msg.data;
                        for (var i = 0; i < resp.length; i++) {
                            $("#payeeId" + resp[i].key).val(resp[i].value);
                        }
                    }
                    if (_typ == 2) {
                        top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success", SQ_showButtons: true});
                        //回调刷新列表
                        var callback = frameElement.W2W.callback;
                        Remove_navTab();
                        callback();
                    }
                }else if(msg.success ==2){//找到多个流程
    				//TODO 
    				console.log(msg.data);
    				var __DATA_radioList = msg.data;
					var selectedVal = '';
					var selectDialog = $.ligerDialog.SQopen({
						 width: 300,
						 height: 200,
						 title : '请选择要发起的流程',
						 allowClose: false,
						 content: '<div id="radiolist1"></div>',
						 fixButtons: true, //固定按钮到底部
						 onOk: function () {
						     console.log(selectDialog);
						     console.log(selectedVal);
						     if(StringUtils.isEmpty(selectedVal)){
						    	 $.ligerDialog.SQalert({content: "请选择要发起的流程.", SQ_type: "warning"});
						         return;
						     }else{
							    selectDialog.close();
						    	var wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting",onClose: function () {}});
	    	            		$.ajax({
	    	                		type: 'post',
	    	                		dataType:'json',
	    	                		data: data,
	    	                		url: _url+'&procDefKey='+selectedVal,
	    	                		success:function(msg){
	    	                			 wait_dialog.close();
	    	                			 if(msg.success == 1){//成功发起流程
	    	               					 /* UIUtils.alertSuccessHold1(msg.info);
	    	                				 grid.reload(); */
	    	                				 if (_typ == 1) {
	    	                                     top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
	    	                                     var resp = msg.data;
	    	                                     for (var i = 0; i < resp.length; i++) {
	    	                                         $("#payeeId" + resp[i].key).val(resp[i].value);
	    	                                     }
	    	                                 }
	    	                                 if (_typ == 2) {
	    	                                     top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success", SQ_showButtons: true});
	    	                                     //回调刷新列表
	    	                                     var callback = frameElement.W2W.callback;
	    	                                     Remove_navTab();
	    	                                     callback();
	    	                                 }
	    	                			 }else if(msg.success == 0){//错误
	    	               					 UIUtils.alertErrorHold1(msg.info);
	    	                			 }
	    	                		}
	    	            		})					    	 
						     }
						 }
					});
					$("#radiolist1").ligerRadioList({
					 data: __DATA_radioList,
					 textField: 'procNm',
					 valueField: 'procDefKey',
					 rowSize: 1,
					 onSelect: function (data)
					 {
					     console.log(data);
					     selectedVal = data.value;
					 }
					});
    			 } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error", SQ_showButtons: true});
                }
            }
        });
    }

    //查询客户详情
    function showCstDtl(_cstId) {
        Add_navTab("InsPlcCstBscInfo_" + _cstId, "客户信息", '<%=path%>/customer/cstbscinfo/toCustDetailPage.do?id=' + _cstId, null);
    }

    //项目详情
    function toPrjDetail(_projectId) {
        if (!_projectId)return;
        Add_navTab("prjDetail" + _projectId, "项目信息", '<%=path%>/project/prjbscinfo/toModifyPage.do?detailFlag=true&id=' + _projectId);
    }

    // 支付表详情
    function showPrjPrdPaySchDtl() {
        var editFlag = true;
        var prjId = '${capPayInfoVO.prjId}';
        var id = '${capPayInfoVO.paySchId}';
        var prjPrdDtlId = '${capPayInfoVO.prjPrdDtlId}';
        var prjPrdId = '${capPayInfoVO.prjPrdId}';
        Add_navTab('tab_prj_quat_prps' + id, '查看支付表', '<%=path%>/project/prjprdpayschm/toAddPage.do?prjId=' + prjId + '&&id=' + id + '&&prjPrdDtlId=' + prjPrdDtlId + '&&prjPrdId=' + prjPrdId + '&&detailFlag=' + editFlag);
    }

    function getFieldsetsValues(fields, count) {
        var fieldsetValues = [];
        for (var i = 0; i < count.length; i++) {
            var values = _getValues(count[i]);
            if (values.bkId == '') {
                continue;
            }
            fieldsetValues.push(values);
        }
        return fieldsetValues;

        function _getValues(i) {
            var values = {};
            $.each(fields, function (index, val) {
                var el = document.getElementById(val + i);
                elID = el.id;
                ligerObj = liger.get(elID);
                value = '';
                if (ligerObj) {
                    value = ligerObj.getValue();
                } else {
                    value = el.value;
                }
                if(value){
                    if(val == 'actPayTms'){
                        value = el.value;
                    }
                    // jzg add 2017-10-17 16:11:11 工行业务
                    if(val == 'actPayAmt'){
                        value = value * 100 ;
                    }
                    if(val == 'realPayAmt'){
                        value = value * 100 ;
                    }
                    values[val] = value;
                }
            });
            return values;
        }
    }

    var _capPayId = '${id}';//付款ID
    var _proIntId = '${proIntId}';//流程实例ID
    var _taskId = '${taskId}';//任务节点ID
    var _taskDefKey = '${taskDefKey}';//任务节点KEY
    var _taskNm = '${taskNm}';//任务节点名称
    function rejOpnStart() {
        var bookTypCd = AuditConstant.AUD_LOAN_BOOK_TYP_CD;//台账类型-放款驳回台账
        var opinionTypeCd = AuditConstant.SYS_FLOW_REJ_RSN_TYP_CD_LOAN;//驳回意见类型-放款驳回
        top.$.ligerDialog.open({
            width: 1000,
            height: 400,
            title: '驳回意见',
            url: '<%=path%>/audit/audRejectOpinion/toAddPage.do?capPayId=' + _capPayId + '&proIntId=' + _proIntId + '&taskId=' + _taskId + '&taskDefKey=' + _taskDefKey + '&opinionTypeCd=' + opinionTypeCd + '&bookTypCd=' + bookTypCd + '&taskNm=' + _taskNm,
            buttons: [{
                text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.onOk) Dialog.onOk();
                }
            }, {
                text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                onclick: function (item, Dialog) {
                    if (Dialog.onCancel) Dialog.onCancel();
                }
            }
            ]
        });
    }

    var _procNm = '${procNm}';//流程定义名称

    //放款合同通过意见
    function contractOpnStart() {
        var _opnTypCd = AuditConstant.AUD_PAY_OPN_TYP_CD_CONTRACT;
        top.$.ligerDialog.open({
            width: 1000,
            height: 400,
            title: '放款合同通过意见',
            url: '<%=path%>/audit/audPayPassOpinion/toModifyPage.do?carAudit=1&capPayId=' + _capPayId + '&proIntId=' + _proIntId + '&opnTypCd=' + _opnTypCd + '&procNm=' + _procNm,
            buttons: [{
                text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.onOk) Dialog.onOk();
                }
            }, {
                text: "预览", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.preview) Dialog.preview();
                }
            }, {
                text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                onclick: function (item, Dialog) {
                    if (Dialog.onCancel) Dialog.onCancel();
                }
            }
            ]
        });
    }
    //放款抵押通过意见
    function mortGageOpnStart() {
        var _opnTypCd = AuditConstant.AUD_PAY_OPN_TYP_CD_MORTGAGE;
        top.$.ligerDialog.open({
            width: 1000,
            height: 400,
            title: '放款抵押通过意见',
            url: '<%=path%>/audit/audPayPassOpinion/toModifyPage.do?carAudit=1&capPayId=' + _capPayId + '&proIntId=' + _proIntId + '&opnTypCd=' + _opnTypCd + '&procNm=' + _procNm,
            buttons: [{
                text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.onOk) Dialog.onOk();
                }
            }, {
                text: "预览", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.preview) Dialog.preview();
                }
            }, {
                text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                onclick: function (item, Dialog) {
                    if (Dialog.onCancel) Dialog.onCancel();
                }
            }
            ]
        });
    }

    //三方资管选择付款状态，同时带出付款额及付款时间选择
    function payerStsCdChange(){
        var payerStsCd =liger.get("payerStatusCd").selectedValue;
        var ligerForm = $("#capPayInfo_form").ligerForm({
            validate: true
        });
        if(null != payerStsCd && payerStsCd == '2'){
            $("#ghAmt").css('display', 'block');
            $("#ghDt").css('display', 'block');
            $("#thdPayAmt").attr('readonly',false);
            $("#thdPayDt").attr('readonly',false);
            ligerForm.setFieldValidate("thdPayAmt", {
                required: true
            });
            ligerForm.setFieldValidate("thdPayDt", {
                required: true
            });
            liger.get("thdPayAmt").setEnabled();
        }else{
            $("#ghAmt").css('display','none');
            $("#ghDt").css('display','none');
            $("#thdPayAmt").attr('readonly',true);
            $("#thdPayDt").attr('readonly',true);
            ligerForm.setFieldValidate("thdPayAmt", {
                required: false
            });
            ligerForm.setFieldValidate("thdPayDt", {
                required: false
            });
        }
    }
    
    <%-- function toSendCredit(){
    	var wait_dialog;
        $.ajax({
    		type: 'post',
    		dataType:'json',
    		url: '<%=path%>/capital/capPayInfo/sendCredit.do?capPayId=${capPayInfoVO.id}',
    		beforeSend: function(){
    	          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
    	     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 //top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    				 UIUtils.alertSuccessHold1(msg.info);
    				 window.location.reload();
    			 }else{
    				 //top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    				 UIUtils.alertErrorHold1(msg.info);
    			 }
    		}
    	});
    } --%>
    
    function submitCredit(){
    	var wait_dialog;
        $.ajax({
    		type: 'post',
    		dataType:'json',
    		url: '<%=path%>/project/audit/submitCredit.do?prjId=${capPayInfoVO.prjId}',
    		beforeSend: function(){
    	          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
    	     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 UIUtils.alertSuccessHold1(msg.info);
    				 window.location.reload();
    			 }else{
    				 UIUtils.alertErrorHold1(msg.info);
    			 }
    		}
    	});
    }

  //保存是否团单
    function saveIsGrp_Btn(){
    	var _isGrp = $("#isGrp").val();
    	if(!_isGrp || _isGrp==" "){
    		top.$.ligerDialog.SQalert({content: "是否团单不能为空.", SQ_type: "warning"});
    		return;
    	}
    	var wait_dialog;
    	$.ajax({
    		type: 'post',
    		dataType:'json',
    		data:{
    			capPayId:_capPayId,
    			isGrp:_isGrp
    		},
    		url: '<%=path%>/capPay/flow/modifyIsGrp.do',
    		beforeSend: function(){
		          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    			 }else{
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
    }
  //保存抵押权人名称
    function addpledgeeAuthNm(){
    	var pledgeeAuthNm = $('#pledgee Select option:selected') .val();//选中的值
    	 var prjPrdDtlId = "${prjPrdDtlId}";//项目产品明细id
    	var wait_dialog;
    		$.ajax({
    			type: 'post',
   			dataType:'json',
   			data:{pledgeeAuthNm:pledgeeAuthNm,id:prjPrdDtlId},
   			url:'<%=path%>/project/prjprdmtg/addpledgeeAuthNm.do',
   			beforeSend: function(){
   		          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
   		     },
   		    success:function(msg){
   				 wait_dialog.close();
   				 if(msg.success == 1){
   					 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
   				 }else{
   					 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
   				 }
   			}
    	})
    	
    }
  
	//请求信审整体资料数据，获取"信审遗留问题"字段值 (参数:项目ID)-JL-20190819
    var audCreditInfoId = "";
    function initAudRemainPro(){
    	var mdf_AudRemainPro = "${mdf_AudRemainPro }";
    	if(mdf_AudRemainPro != "1"){
    		$("#audRemainPro").setDisabled_ligerTextarea(true); //禁用"信审遗留问题"-JL
    	}
    	var _projectId = "${capPayInfoVO.prjId}";
    	if(!_projectId){
    		return;
    	}
       	var _url = '<%=path%>/audit/audCreditInfo/getAudCreditInfoByPrjId.do';
    	$.ajax({
       		type: 'get',
       		dataType:'json',
       		data:{
       			projectId:_projectId
       		},
       		url: _url,
       		success:function(msg){
    			if(msg.success == 1){
    				$("#audRemainPro").val(msg.data.audRemainPro); //设置数据显示
    				audCreditInfoId = msg.data.id; //信审整体资料主键
    			}else{
    				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			}
    		}
    	});
    }
    //保存"信审遗留问题"到"信审整体资料表"-JL-20190819
    function saveAudRemainPro(){
    	var audRemainPro = $("#audRemainPro").val();
        if (audRemainPro && audRemainPro.length > 250) {
            top.$.ligerDialog.SQalert({content: "信审遗留问题不能大于250个字符", SQ_type: "warning"});
            return false;
        }
    	if(!audCreditInfoId){
    		top.$.ligerDialog.SQalert({content:"信审整体资料主键为空异常！", SQ_type: "warning"});
    		return;
    	}
    	var wait_dialog;
    	$.ajax({
    		type: 'post',
    		dataType:'json',
    		data:{
    			id:audCreditInfoId,
    			audRemainPro:audRemainPro
    		},
    		url: '<%=path%>/audit/audCreditInfo/modifyAudCreditInfo.do',
    		beforeSend: function(){
				wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
 		    },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    			 }else{
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
    }
</script>
</body>
</html>
